import EInputEventType from "../enums/EInputEventType";

export default class CanvasInputEvent {
    // 三个boolean变量，用来指示Alt、Ctrl、Shift键是否被按下
    public altKey: boolean;
    public ctrlKey: boolean;
    public shiftKey: boolean;
    // type是一个枚举对象，用来表示当前的事件类型，枚举类型定义在下面的代码中
    public type: EInputEventType;

    // 构造函数，使用了default参数，初始化时3个组合键都是false状态
    public constructor(type: EInputEventType, altKey: boolean = false, ctrlKey: boolean = false, shiftKey: boolean = false) {
        this.altKey = altKey;
        this.ctrlKey = ctrlKey;
        this.shiftKey = shiftKey;
        this.type = type;
    }
}